﻿<local:DocumentBase x:Class="WPFExcelReport.AB55PR"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
          
         Loaded="Window_Loaded"
        Title="AB55PR"  
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
            <Button Content="生成报表" Height="40" Margin="30,10,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <TextBlock FontSize="18"  Height="40"   Width="59" Name="txt1" Margin="10,10,0,0" Text="生产单" />
            <TextBlock FontSize="18"  Height="36"   Width="47" Name="txtABPAUFKRS" Margin="5,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="36"    Width="130" Name="txtABPAUFLFD"   Margin="5,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="35"    Width="50" Name="txtABPAUFPOS"   Margin="5,10,0,0" Text="" />
        </StackPanel>
        <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ABPOS}" x:Name="ABPOSDataGrid" 
                               SelectionChanged="MainDataGrid_SelectionChanged" Grid.ColumnSpan="2" Margin="0,98,0,0" Grid.RowSpan="4">
            <fd:FilteringDataGrid.Columns>               
                <DataGridTextColumn Header="加工厂"   Binding="{Binding LSNAME1}"/>
                <DataGridTextColumn Header="生"     Binding="{Binding Path=ABPAUFKRS}"/>
                <DataGridTextColumn Header="产"     Binding="{Binding ABPAUFLFD}"/>
                <DataGridTextColumn Header="单"     Binding="{Binding ABPAUFPOS}"/>
                <DataGridTextColumn Header="品种"   Binding="{Binding ABPART}"/>
                <DataGridTextColumn Header="版本"   Binding="{Binding ABPVAR}"/>
                <DataGridTextColumn Header="色号"   Binding="{Binding ABPFARBE}"/>
                <DataGridTextColumn Header="数量"   Binding="{Binding WEI}"/>
                <DataGridTextColumn Header="开始"   Binding="{Binding ABPSTARTDAT}"/>
                <DataGridTextColumn Header="交期"   Binding="{Binding ABPENDDAT}"/>
                <DataGridTextColumn Header="DI单"   Binding="{Binding DIORDER}"/>
                <DataGridTextColumn Header="行备注" Binding="{Binding REMARK}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
    </Grid>
</local:DocumentBase>
